<ion-view  view-title="我的订单" class="bg-fff" >
    <ion-header-bar class="index_head">
        <button class="button button-icon icon ion-android-arrow-back" ng-click="$ionicGoBack()" style="color: #fff"></button>
        <div class="h1 title"> 我的订单</div>
    </ion-header-bar>

    <div class="row row-no-padding order_top_main" style="z-index: 999;
    position: absolute;
    overflow: hidden;">
        <!--<div ng-click="goUpload()" onclick="_hmt.push(['_trackEvent', 'upproduct2', 'click', 'literature'])">-->
        <!--<img width="24px" height="20px" src="img/home_upload.png">-->
        <!--<div>上传</div>-->
        <!--</div>-->
        <!--<div class="w4-prolist-search-input col" ui-sref="search">-->
        <!--<img style=";position: absolute;top: 9px;left: 15px;" src="img/home_search.png" width="12px" height="12px" >-->
        <!--<div style="overflow: hidden;">-->
        <!--<input disabled="disabled" type="search" placeholder="{{searchName}}" style="background-color: #fff; height: 28px; padding:0;;border: none; font-size: 13px;width: 100%;">-->
        <!--</div>-->
        <!--</div>-->
        <!--<div ng-click="goInform()" style="position:relative">-->
        <!--<div ng-if="ddzt.allCount && ddzt.allCount != 0" style="position: absolute;font-size: 10px;color: #fff;top: 4%;left: 44.5%;position: absolute;background-color: #fc353a;border-radius: 8px;line-height: 15px;height: 15px;padding: 0 3.5px;text-align:center;border:1px #fff solid">{{ddzt.allCount}}</div>-->
        <!--<img width="24px" height="20px" src="img/home_message.png">-->
        <!--<div>消息</div>-->
        <!--</div>-->
        <!--<div class="w4-prolist-search-btn" ui-sref="search">-->
        <!--<img width="14px" src="img/home_search.png">-->
        <!--</div>-->
        <!--<ion-scroll style="background-color: #f8f8f8;overflow: hidden" direction="x" scrollbar-x="false" delegate-handle="mainScroll">-->

            <!--<div class="w4-prolist-slelist" style="width: 450px" id="orderslelist" >-->
                <!--<div class="w4-prolist-sle">全部</div>-->
                <!--<div>预约中</div>-->
                <!--<div>待打款</div>-->
                <!--<div>待结佣</div>-->
                <!--<div>结佣成功</div>-->
                <!--<div>失败</div>-->
            <!--</div>-->
        <!--</ion-scroll>-->
        <div class="order_head_wrap">
            <ul class="order_head_main row">
                <li class="col-25 active" ng-class="{true:'active',false:''}[isTab == 1]" ng-click="tabShow(1)">
                    全部
                </li>
                <li class="col-25" ng-class="{true:'active',false:''}[isTab == 2]" ng-click="tabShow(2)">
                    未完成
                </li>
                <li class="col-25" ng-class="{true:'active',false:''}[isTab == 3]" ng-click="tabShow(3)">
                    已完成
                </li>
                <li class="col-25"  ng-class="{true:'active',false:''}[isTab == 4]" ng-click="tabShow(4)">
                    失败
                </li>
            </ul>
            <ul class="order_head_list row" ng-show="isTab == 2">
                <li class="col-33 active"  ng-class="{true:'active',false:''}[orderTab == 1]" ng-click="orderList(1)">
                    预约中
                </li>
                <li class="col-33"  ng-class="{true:'active',false:''}[orderTab == 2]" ng-click="orderList(2)">
                    待打款
                </li>
                <li class="col-33"  ng-class="{true:'active',false:''}[orderTab == 3]" ng-click="orderList(3)">
                    待结佣
                </li>
            </ul>
        </div>
    </div>

    <ion-pane  class="has-header" id="ordersletabview" style="top: 40px;">

        <!--集合信托-->
        <div class="viewtabs"  >
            <ion-content class="has-footer"  on-scroll="getScrollPosition('one')" delegate-handle="one" style=" padding-top: 10px;" ng-class="{true:'order_con_top2', false:'order_con_top'}[isTab==2]">
                <ion-refresher
                        pulling-text="下拉刷新"
                        pulling-icon = 'icon-sfa'
                        refreshing-text = '正在刷新'
                        on-refresh="doRefresh()">
                </ion-refresher>
                <div class="w4-prolist-list w4-prolist-list-issort" ng-repeat="item in outOrderList" ng-click="toView(item.type,item.code)" >
                    <div class="list" style="background: #efeff4;">
                        <div class="item row" style="border: none;line-height: 28px;padding-left: 15px;">
                            <img style="margin-top: 12px" ng-if="item.orderFail" src="img/order_error.png" width="13px" height="13px"/>
                            <img style="margin-top: 12px" ng-if="item.orderEnd" src="img/order_success.png" width="13px" height="13px"/>
                            <img style="margin-top: 12px" ng-if="!item.orderEnd && !item.orderFail" src="img/order_goon.png" width="13px" height="13px"/>
                            <div class="col">

                                {{item.payStatusStage}}
                            </div>


                            <!--<div ng-if="item.isContract" class="col  text-right">申请合同</div>-->
                            <!--<div   class="col  text-right">-->
                                <!--<button ng-if="item.isPho" ui-sref="app.order.orderOut.detail.updata({id: item.id})" class="button button-small button-clear button-assertive" style="border: 1px solid #f35244;color: #f35244">-->
                                    <!--在线报单-->
                                <!--</button>-->
                                <!--<button ng-if="item.isRebateConfirm" ng-click="ckisRebateConfirm(item.id)" class="button button-small button-clear button-assertive" style="border: 1px solid #f35244;color: #f35244">-->
                                    <!--确认返佣-->
                                <!--</button>-->
                            <!--</div>-->



                        </div>
                        <div class="item item-color1">
                            <div style="white-space: initial;">产品名称：{{item.pName}}</div>
                            <div>客户名称：{{item.cName}}</div>
                            <a ng-if="item.cMobile != '未知'" style="color: #4c4c4c;"href="tel:{{item.cMobile}}">客户电话：{{item.cMobile}}</a>
                            <div ng-if="item.pType=='01'||item.pType=='02'||item.pType=='03'||item.pType=='04'||item.pType=='05'||item.pType=='06'||item.pType=='07'">预约金额：{{item.amount | abbrMoney}}</div>
                            <div ng-if="item.pType!='01'&&item.pType!='02'&&item.pType!='03'&&item.pType!='04'&&item.pType!='05'&&item.pType!='06'&&item.pType!='07'">预约金额：{{item.amount}}万</div>
                            <div>预约时间：{{item.createDate}}</div>
                            <div ng-if="item.orderCode">订单编号：{{item.orderCode}}</div>
                            <div ng-if="!item.orderFail&&item.orderCode">报单状态：{{item.phoStatus|orderPhoStatus}}</div>
                            <div ng-if="item.userContract.contractCode&&item.orderCode">合同编号：{{item.userContract.contractCode}}</div>
                            <div ng-if="!item.orderFail&&item.orderCode">合同状态：{{item.contractStatus | orderContractStatus}}</div>
                            <div ng-if="item.rebateAmount">佣金：{{item.rebateAmount | abbrMoney}}</div>


                        </div>
                    </div>
                    <div class="button_warp">

                        <div ng-click="canceReservation(item.id)" ng-if="item.isCancel&&item.orderCode" style="margin-top: -10px;padding-bottom: 10px;float: right;margin-right: 10px;">
                            <button class="button button-small button-clear button-assertive" style="border: 1px solid #fb8223;color: #fb8223;">
                                取消预约
                            </button>

                        </div>
                        <a href="tel:{{item.cMobile}}" ng-if="item.cMobile != '未知'" style=" margin-top: -10px;padding-bottom: 10px;text-align: right;margin-right: 15px;float: right;">
                            <button class="button button-small button-clear button-assertive button-css" style="border: 1px solid #fb8223;color: #fb8223;">
                                客户电话
                            </button>

                        </a>
                        <div ng-click="ckisRebateConfirm(item.id)" ng-if="item.isRebateConfirm" style=" margin-top: -10px;padding-bottom: 10px;text-align: right;margin-right: 10px;float: right;">

                            <button class="button button-small button-clear button-assertive" style="border: 1px solid #fb8223;color: #fb8223">
                                确认返佣
                            </button>
                        </div>
                    </div>




                </div>
                <ion-infinite-scroll ng-if="pager.hasNaxtPage "
                                     on-infinite="loadMore()"
                                     distance="1%" >
                </ion-infinite-scroll>
                <div class="w4-prolist-nomore" ng-if="!pager.hasNaxtPage">没有更多的了</div>
            </ion-content>
        </div>



        <a class="icon" ng-show="isTop" ng-click="goTop(index)" style="position:absolute;bottom:20px;right:10px;z-index: 99;width:45px;height:45px;font-size:45px;text-align:center; background: url(https://www.superfa.cn/upload/bann/20160118/1453110210811t.png) no-repeat center top; background-size: 100%;"></a>
    </ion-pane>

    <!--<ion-content class="wap3-user wap3-center  has-tabs">-->
    <!--&lt;!&ndash;<div class="order-tab" style="margin-top: 15px;">&ndash;&gt;-->
    <!--&lt;!&ndash;<a class="order-tab-item" ng-class="{'active': currentOutOrIn == 'out'}" ng-click="changeOutOrIn('out')">买单</a>&ndash;&gt;-->
    <!--&lt;!&ndash;<a class="order-tab-item" ng-class="{'active': currentOutOrIn == 'in'}" ng-click="changeOutOrIn('in')">卖单</a>&ndash;&gt;-->
    <!--&lt;!&ndash;</div>&ndash;&gt;-->
    <!---->

    <!--<div ng-show="currentOutOrIn == 'out'" ng-include="'views/order/out.html?1'"></div>-->
    <!--<div ng-show="currentOutOrIn == 'in'" ng-include="'views/order/in.html?1'"></div>-->

    <!--<ion-infinite-scroll ng-if="pager.hasNaxtPage" on-infinite="loadMore()" distance="1%"></ion-infinite-scroll>-->
    <!--</ion-content>-->
</ion-view>
